$package('YiYa.merchant');
YiYa.merchant = function(){
	var _box = null;
	var _this = {
		config:{
			dataGrid:{
				title:'开支类型列表',
				url:'dataList.do',
				columns:[[
				          {field:'id',checkbox:true},
				          {field:'name',title:'开支类型名称',width:120,sortable:true},
				          {field:'detail',title:'是否明细到客户',width:120,sortable:true,
				        	  formatter:function(value,row,index){
					        		if(value == 1){
					        			return "是";
					        		}else{
					        			return "否";
					        		}
					        		
					        	}  
				          }
				          ]],
				          toolbar:[
				                   {id:'btnadd',text:'添加',btnType:'add'},
				                   {id:'btnedit',text:'编辑',btnType:'edit'},
				                   {id:'btndelete',text:'删除',btnType:'remove'},
				                   {id:'btnview',text:'查看',btnType:'view'}
				                   ]
			}
		},
		init:function(){
			_box = new YDataGrid(_this.config);
			_box.init();
		}
	}
	return _this;
}();

$(function(){
	YiYa.merchant.init();
});


